// components/grid-item/grid-item.js
Component({
  relations: {
    "../grid/grid": {
      type: "parent",
    },
  },
  /**
   * 组件的属性列表
   */
  properties: {
    icon: String,
    iconSize: {
      type: String,
      value: "50",
    },
    text: String,
    showBadge: Boolean,
    badgeCount: Number,
    cell: Object,
  },

  /**
   * 组件的初始数据
   */
  data: {},

  /**
   * 组件的方法列表
   */
  methods: {
    handleSelect() {
      this.triggerEvent(
        "select",
        { cell: this.data.cell },
        { bubbles: true, composed: true }
      );
    },
  },
});
